package client.handler;

import client.Client;
import unit.response.CreateNewUserRequestResponse;
import unit.response.Response;

/**
 * Created by IntelliJ IDEA.
 * User: victorn
 * Date: 8/23/11
 * Time: 12:19 AM
 * To change this template use File | Settings | File Templates.
 */
public class CreateNewUserResponseHandler extends AbstractResponseHandler {

    public CreateNewUserResponseHandler(Client client) {
        super(client);
    }

    @Override
    public void handleRequest(Response response) {
        client.clientID = ((CreateNewUserRequestResponse) response).getUserId();
        client.currentSession = response.getSession();

        client.clientInterface.setLoginState(true);
    }
}
